package com.itheima.package3_atom.demo;

public class MyAtomThread implements Runnable {
    private  int count = 0;
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            synchronized (this){
            count++;
            System.out.println("已经送了"+count+"个冰淇淋");
            }
        }
    }
}
